{% extends "base.html" %}
{% load staticfiles %}
{% block custom_bread %}
    <section>
        <div class="wp">
            <ul class="crumbs">
                <li><a href="/">首页</a>></li>
                <li>论坛</li>

            </ul>
        </div>
    </section>
{% endblock %}
{% block title %}论坛{% endblock %}

{% block head %}
    <link rel="stylesheet" href="{% static 'css/muke/style.css' %}">
    <script src="{% static 'js/bootstrap.min.js' %}" type="text/javascript"></script>
{% endblock %}

{% block content %}
    <section>
    <div class="wp butler_list_box list">
    <div class="left">
    <div class="butler_list layout">
    <div class="head">
        <ul class="f1 tab_header">
            <li class="{% if sort == '' %}list-active{% endif %}"><a href="?sort=">最新 </a></li>
            <li class="{% if sort == 'read' %}list-active{% endif %}"><a href="?sort=read&current_id={{ current_id }}">阅读最多</a></li>
            <li class="{% if sort == 'comment' %}list-active{% endif %}"><a href="?sort=comment&current_id={{ current_id }}">评论最多</a></li>
        </ul>
    </div>
 {% for tie in ties.object_list %}
    <dl class="des">
            <dt style="width: 60px">


                    <a  href="{% url 'bbs:detail' tie.id %}">
                        <div class="picpic" style="width: 60px;height: 60px" ><img src="{{ MEDIA_URL }}{{ tie.author.image }}"  width="60px" height="60px" class="scrollLoading"></div></a>
            </dt>
            <dd style="float: left;margin-left: 50px">
                <a href="{% url 'bbs:detail' tie.id %}"> <h1>{{ tie.title }}</h1></a>
                <ul>
                    <li><span>作者：{{ tie.author.username }}</span></li>
                    <li> <span>发布时间：{{ tie.add_time }}</span></li>
                    <li> <span>评论：{{ tie.comment_num }}</span></li>
                    <li><span>阅读数：{{ tie.read_num }}</span></li>
                </ul>
            </dd>
</dl>
 {% endfor %}</div>





        <div class="pageturn" style="text-align: center;">

{#                <ul class="pagelist">#}
{#                    {% if ties.has_previous %}#}
{#                        <li><a href="?{{ ties.previous_page_number.querystring }}">上一页</a></li>#}
{#                    {% else %}#}
{#                        <li class="disabled"><span>上一页</span></li>#}
{#                    {% endif %}#}
{#               {% for page in ties.pages %}#}
{#                  {% if page %}#}
{#                    {% ifequal page ties.number %}#}
{#                        <li class="active"><a href="?{{ page.querystring }}">{{ page }}</a></li>#}
{#                    {% else %}#}
{#                       <li><a href="?{{ page.querystring }}">{{ page }}</a></li>#}
{#                    {% endifequal %}#}
{#                  {% else %}#}
{#                      <li class="none"><a href="">...</a></li>#}
{#                 {% endif %}#}
{#               {% endfor %}#}
{#        {% if ties.has_next %}#}
{#                <li class="long"><a href="?{{ ties.next_page_number.querystring }}">下一页</a></li>#}
{#        {% else %}#}
{#            <li class="disabled"><span>下一页</span></li>#}
{#        {% endif %}#}
{##}
{#                </ul>#}

        </div></div>

    <div class="right layout" style="margin-left: 20px;float: left">
        <div class="head">   <a href="{% url 'bbs:add_topic' %}" >发布帖子</a>
</div>




{#            <a href="?current_id=" class=" button {% if current_id == '' %}list-group-item active{% else %}list-group-item{% endif %}">所有板块</a>#}
{#          {% for board in boards %}#}
{#              <a href="?current_id={{ board.id }}&sort={{ sort }}" class="{% ifequal current_id board.id|stringformat:"i" %}list-group-item active{% else %}list-group-item{% endifequal %}">{{ board.name }}</a>#}
{#          {% endfor %}#}


        </div>
    </div>
    </section>{% endblock %}